# which CC to use
CC=g++

# options to pass to the compiler
#CFLAGS=-c -Wall -I../ -I/usr/include/SDL
CFLAGS=-c -I../ -I/usr/include/SDL -DLINUX

all: dertmap

dertmap: dertmap.o GameBase.o DertTerritory.o SDLSurfaceCache.o GameRuleEngine.o
	$(CC) dertmap.o GameBase.o DertTerritory.o SDLSurfaceCache.o GameRuleEngine.o -o ../../Run/dertmap -L/usr/lib/x86_64-linux-gnu -lSDL -lSDLmain -lSDL_mixer -lSDL_ttf

dertmap.o: ../dertmap.cpp
	$(CC) $(CFLAGS) ../dertmap.cpp

GameBase.o: ../GameBase.cpp
	$(CC) $(CFLAGS) ../GameBase.cpp

DertTerritory.o: ../DertTerritory.cpp
	$(CC) $(CFLAGS) ../DertTerritory.cpp
	
SDLSurfaceCache.o: ../SDLSurfaceCache.cpp
	$(CC) $(CFLAGS) ../SDLSurfaceCache.cpp

GameRuleEngine.o: ../GameRuleEngine.cpp
	$(CC) $(CFLAGS) ../GameRuleEngine.cpp
		
clean:
	rm -rf *o ../../Run/dertmap
